package com.sad.we11cis;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MarketerPage extends Activity implements OnClickListener {
	
	String marketerID;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_marketer_page);
		
		Intent marketerInfo = getIntent();
		marketerID = marketerInfo.getStringExtra("marketerID");
		
		Button prodRegiBtn = (Button)findViewById(R.id.btnProductRegiM);
		prodRegiBtn.setOnClickListener(this);
		Button eventRegiBtn = (Button)findViewById(R.id.btnEventRegi);
		eventRegiBtn.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.marketer_page, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
		switch(v.getId()){
		
			case R.id.btnProductRegiM:
				Intent proRegi = new Intent(MarketerPage.this, ProductRegister.class);
				proRegi.putExtra("marketerID", marketerID);
				startActivity(proRegi);
				break;
				
			case R.id.btnEventRegi:
				break;
		
		}
		
	}

}
